//
//  AppDelegate.swift
//  wmyweibo
//
//  Created by 王明玉 on 16/1/10.
//  Copyright © 2016年 王明玉. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
      
        setThemeColor()
       window = UIWindow(frame:UIScreen .mainScreen().bounds)
        //背景颜色
        window?.backgroundColor = UIColor.whiteColor()
        window?.rootViewController = MainViewController()
        window?.makeKeyAndVisible()
        
        return true
    }
    //需要尽早设置 必须在视图实例化之前设置
    private func setThemeColor(){
        //导航控制器的全局色 是  橙色
        UINavigationBar.appearance().tintColor = UIColor.orangeColor()
        UITabBar.appearance().tintColor = UIColor.orangeColor()
    }
    

}

